﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;

namespace Dungeon_Dive
{
    
    /// <summary>
    /// ElementToken represents elemental picups.
    /// </summary>
    class ElementToken : GameEntity
    {
        public ElementToken(Game game, Elements type) : base(game)
        {
            string ns = "Models\\";

            switch (type)
            {
                case Elements.Air:
                    ns += "airtoken";
                    break;
                case Elements.Earth:
                    ns += "earthtoken";
                    break;
                case Elements.Fire:
                    ns += "firetoken";
                    break;
                case Elements.Water:
                    ns += "watertoken";
                    break;
                default:
                    ns += "airtoken";
                    break;
            }

            this.AddFrame("default", game.Content.Load<Model>(ns));
            this.CurrentAnim = "default";
            Scale = 0.75f;
            Rotation = 0.0f;

            CreateBoundingSphere();

            AddToken(type);

        }

        public Elements GetElement()
        {
            return tokens.Peek();
        }

        public override bool HandleHit(int type)
        {
            return false;
        }
    }
}
